home *** CD-ROM | disk | FTP | other *** search
/ Gigarom 1 / Gigarom Macintosh Archives (Quantum Leap)(CDRM1080320)(1993).iso / FILES / HYP / C-D / DeveloperStax.cpt / Developer Stack 1.1 / card_21011.txt < prev    next >
Text File  |  1989-02-26  |  2KB  |  68 lines

  1. -- card: 21011 from stack: in.1
  2. -- bmap block id: 0
  3. -- flags: 0000
  4. -- background id: 3837
  5. -- name: sortItems
  6.  
  7.  
  8. -- part 1 (button)
  9. -- low flags: 00
  10. -- high flags: A003
  11. -- rect: left=82 top=302 right=324 bottom=182
  12. -- title width / last selected line: 0
  13. -- icon id / first selected line: 0 / 0
  14. -- text alignment: 1
  15. -- font id: 0
  16. -- text size: 12
  17. -- style flags: 0
  18. -- line height: 16
  19. -- part name: Install
  20. ----- HyperTalk script -----
  21. on mouseUp
  22.   if the optionkey is down then pass mouseup
  23.   put installres(XFCN,sortItems) into it
  24.   if it is empty then play oops
  25.   else answer it
  26. end mouseUp
  27.  
  28.  
  29.  
  30. -- part contents for background part 10
  31. ----- text -----
  32. 10
  33.  
  34. -- part contents for background part 5
  35. ----- text -----
  36. sortItems
  37.  
  38. -- part contents for background part 6
  39. ----- text -----
  40.  
  41. This  will sort  the items in a HyperCard field.  As you know an item is any number of characters separated by commas.  This XFCN will put them into ascending or descending order, and optionally put each item on a separate line.
  42.  
  43. Marvin G. Nelsen
  44. 20462 Castle Rock Cir.
  45. Huntington Beach CA. 92646
  46.  
  47. GENIE: M.NELSEN
  48.  
  49. -- part contents for background part 7
  50. ----- text -----
  51. Syntax:
  52.  
  53. SortItems(input, <Lines>,
  54. <Descending>)
  55.  
  56. input:  Any HyperCard Container
  57. Lines: "true" means put each sorted item into a separate line.
  58. "false" means put all sorted items
  59. into one line. (Default)
  60. Descending:  "DE" forces the sort to be in descending order.
  61.  
  62. The function returns a sorted list.
  63.  
  64. Example:
  65. put SortItems(input,true) into output
  66.  
  67. output may be the same container as input.
  68. The sort is Case Insensitive.